# HG changeset patch # User dan@scribus.fuhry.local.fuhry.local # Date 1181766747 14400 # Node ID 0931d60f5bdbef52933c9a318e0ab9a1ae0a6ed5 # Parent fe660c52c48fa5d2cda50a47c0761627e1dcca10 Adding compatibility patch for Enano dev servers to common.php diff -r fe660c52c48f -r 0931d60f5bdb includes/common.php --- a/includes/common.php Wed Jun 13 16:07:17 2007 -0400 +++ b/includes/common.php Wed Jun 13 16:32:27 2007 -0400 @@ -36,8 +36,18 @@ error_reporting(E_ALL); +// Determine directory (special case for development servers) +if ( strpos(__FILE__, '/enano-clean/') && file_exists('.enanodev') ) +{ + $filename = str_replace('/enano-clean', '', __FILE__); +} +else +{ + $filename = __FILE__; +} + if(!defined('ENANO_ROOT')) // ENANO_ROOT is sometimes defined by plugins like AjIM that need the constant before the Enano API is initialized - define('ENANO_ROOT', dirname(dirname(__FILE__))); + define('ENANO_ROOT', dirname(dirname($filename))); if(defined('ENANO_DEBUG') && version_compare(PHP_VERSION, '5.0.0') < 0) {